package com.zjp.mg.core;


import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.mongodb.config.EnableMongoAuditing;

import java.util.Date;

@Getter
@Setter
@EnableMongoAuditing
public class MgEntity {
    @JsonIgnore
    @CreatedBy
    private Integer isDeleted;
    /**
     * 创建者
     */
    @JsonIgnore
    @CreatedBy
    private String createBy;
    /**
     * 更新者
     */
    @JsonIgnore
    @LastModifiedBy
    private String updateBy;


    /**
     * 创建时间
     */
    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonIgnore
    @CreatedDate
    private Date createTime;


    /**
     * 更新时间
     */
    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonIgnore
    @LastModifiedDate
    private Date updateTime;


}
